package tech.xiaozai.rbac.service;

import org.springframework.transaction.annotation.Transactional;
import tech.xiaozai.common.CommonPage;
import tech.xiaozai.rbac.po.SysRole;

import java.util.List;

/**
 * @author xiaozai
 * @version 1.0
 * @date 2020-09-17 08:59
 */
public interface RoleService {
    SysRole getById(Long id);

    CommonPage<SysRole> page(Integer pageNum, Integer pageSize, SysRole role);

    @Transactional(rollbackFor = Exception.class)
    void insert(SysRole role);

    @Transactional(rollbackFor = Exception.class)
    void update(SysRole role);

    @Transactional(rollbackFor = Exception.class)
    void delete(Long id);

    @Transactional(rollbackFor = Exception.class)
    void delete(List<Long> ids);

    List<SysRole> all();
}
